PATHMac OS 8 and 9 Developer Documentation > Interapplication Communication > AppleScript for Scripters >

AppleScript Language Guide

   

Considering and Ignoring Statements

Considering statements allow you to control the way AppleScript executes operations and commands by listing specific characteristics, called attributes. to be taken into account as the operations and commands are executed. Ignoring statements work the same way, except that you list specific attributes to be ignored.

The attributes you can use include

The following is an example of a string comparison without a Considering statement:.

"This" = "this"
--result: true

The value of the string comparison is true , because by default, AppleScript does not distinguish uppercase from lowercase letters.

Here's the same comparison within a Considering statement:

considering case
    "This" = "this"
end considering
--result: false

The Considering statement specifies that a particular attribute of strings--their case--is to be used in comparisons. As a result the comparison "This" = "this" is now false , because the uppercase "T" in "This" does not match the lowercase "t" in "this" .


© 1999 Apple Computer, Inc. – (Last Updated 21 May 99)